package cn.dai.util;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * @author ArkD42
 * @file OA Sys
 * @create 2020 - 06 - 16 - 16:12
 */
public class C3p0Util {

    private static ComboPooledDataSource dataSource = new ComboPooledDataSource("c3p0");

    public static Connection getConnection(){
        try {
            return dataSource.getConnection();
        } catch (SQLException sqlException) { sqlException.printStackTrace(); }
        return null;
    }
}
